@extends('member.member')

<!-- title -->
@section('title', '我的文档')

<!-- 中间内容块 -->
@section('rightcontainer')
<div class="my_integral">
    @if (count($errors) > 0)
    	<div class="alert alert-danger">
    		<strong>抱歉!</strong>.<br><br>
    		<ul>
    			@foreach ($errors->all() as $error)
    				<li>{{ $error }}</li>
    			@endforeach
    		</ul>
    	</div>
    @endif
    <div>
    	<div class="integral_left fl">
    		<ul style="margin-top:25px"	> 
    			<li style="height: 35px;text-align:35px"><span class="ft-20">我的积分余额：<span style="color:red">{{empty($score)?0:$score->score}}</span></span></li>
    			<li>
    				<span class="integral-but">
    				<a href="{{url('/member/recharge')}}" class="head_a">立即充值</a>
    				</span>
    			</li>
    		</ul>
    	</div>
    	<div class="integral_right fr">
    		<ul style="margin-top:25px"> 
    			<li style="height: 35px;text-align:35px">{{--<span class="ft-20">连续登陆 <span style="color:red">10</span> 天</span>--}}</li>
    			<li style="height: 40px;text-align:40px">
    				<span class="integral-but-2">
    				<a href="#" style="color:#009679!important;">{{--领取积分--}} 功能正在开发中</a>
    				</span>
    			</li>
    			<li class="cor-3 mt-10">{{--每日最多可领取一次--}}</li>
    		</ul>
    	</div>
    	<div class="clearfix"></div>
	</div>
	<table  class="integral_table">
		<tr class="int_title">
			<td>积分收益</td>
			<td>积分支出</td>
			<td>收支记录</td>
		</tr>
		@foreach($logs as $log)
		<tr class="int_cont">
			<td>@if($log->scores > 0) {{$log->scores}}@else 0  @endif</td>
			<td>@if($log->scores < 0) {{abs($log->scores)}}@else 0 @endif</td>
			<td id="read_{{$log->id}}">@if($log->is_read == 1)<a href="javascript:void(0)"  onclick="toRead('/member/account/{{$log->id}}','read_{{$log->id}}')">已查看</a>@else <a href="javascript:void(0)"  onclick="toRead('/member/account/{{$log->id}}','read_{{$log->id}}')">未查看</a>@endif</td>
		</tr>
		@endforeach
	</table>
	</div>
</div>
<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">积分详情</h4>
      </div>
      <div class="modal-body">
            <form id='validated'>
                <table class="table table-striped" id="showinfos">
                </table>
            </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-info" id="submittags" data-dismiss="modal" onclick="to_validate('/admin/employ/index/validate','{{ csrf_token() }}')">确定</button>
        <button type="button" class="btn" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>
@stop

<!-- 底部块 -->
@section('footer')
    @parent
@stop

